package com.xuyoupeng.springframework.beans.factory;

import com.xuyoupeng.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.BeansException;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public interface BeanFactory {
    Map<String, BeanDefinition> beanDefinitionMap = new ConcurrentHashMap<>();

     Object getBean(String beanName) throws BeansException;

     Object getBean(String beanName, Object... args) throws BeansException;;

    <T> T getBean(String name, Class<T> requiredType) throws BeansException;

    <T> T getBean(Class<T> requiredType) throws BeansException;
    void registerBeanDefinition(String BeanName, BeanDefinition beanDefinition);
}
